import { Column, Entity, Index } from 'typeorm';
import { IBaseEntity } from '../../00_base/IBaseEntity';

@Index('PK__sys_user__6EDEA1534E48D34D', ['userId', 'roleId'], { unique: true })
@Entity('sys_user_role', { schema: 'dbo' })
export class SysUserRole extends IBaseEntity {
  constructor(userId: number, roleId: number) {
    super();
    this.userId = userId;
    this.roleId = roleId;
  }
  @Column('bigint', { primary: true, name: 'user_id' })
  userId: number;

  @Column('bigint', { primary: true, name: 'role_id' })
  roleId: number;
}
